package ${package}.web.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import lombok.extern.slf4j.Slf4j;

/**
 * @author : spwei create at: 2019/12/17 下午4:41
 * @description: dev ops服务器启动检测是否成功用
 */
@Slf4j
@RestController
public class OkController {

    /**
     * 检查
     * 
     * @return
     */
    @GetMapping("/ok")
    public Object ok(HttpServletRequest httpRequest) {
        log.debug("x-forwarded-for:" + httpRequest.getHeader("x-forwarded-for"));

        log.debug("X-Real-IP:" + httpRequest.getHeader("X-Real-IP"));

        log.debug("RemoteAddr:" + httpRequest.getRemoteAddr());

        log.debug("localhost:" + httpRequest.getRemoteAddr());

        return "ok";
    }
}
